<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('showStatusList')}" method="post">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">							
								<select name="cate_code" style="width:250px;" class="chosen_search">
									<option value="">全部分类列表</option>
	                				<volist name="cateTree" id="val_1">
								    	<option value="{$val_1.code}"  <if condition="$val_1['code'] eq $search['cate_code']">selected</if>>{$val_1.code}-{$val_1.title}</option>
										<volist name="val_1['children']" id="val_2">
											<option value="{$val_2.code}"  <if condition="$val_2['code'] eq $search['cate_code']">selected</if>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$val_2.code}{$val_2.title}</option>								
										</volist>
	                				</volist>
								</select>
								<input type="checkbox" name="is_hot" value="1" <if condition="$search['is_hot'] eq 1">checked</if>>热门
								<input type="checkbox" name="is_recommend" value="1" <if condition="$search['is_recommend'] eq 1">checked</if>>推荐
								<input type="checkbox" name="is_new" value="1" <if condition="$search['is_new'] eq 1">checked</if>>新品
								<input type="checkbox" name="is_foreign" value="1" <if condition="$search['is_foreign'] eq 1">checked</if>>进口
								<input type="text" name="name" value="{$search.name}" placeholder="商品名称">
								<input type="text" name="brand" value="{$search.brand}" placeholder="条形码">
								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>	
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
	    	<input type="hidden" name="auth_type" value="group">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="40" align="center">图片</th>            
			                <th width="120" align="left">商品名称</th>
			                <th width="70" align="left">实际价格</th>
			                <th width="80" align="left">规格/单位</th>
			      			<th width="40" align="left">热门</th>
			      			<th width="40" align="left">推荐</th>
			      			<th width="40" align="left">新品</th>
			      			<th width="40" align="left">进口</th>
			      			<th width="40" align="left">排序</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
				        <tr>
				        	<td align="center"><img src="{$val.prod_id|m_prod_pic}?{$Think.now} "  id="pic_{$val.prod_id}" width=45  height=30></td>
				            <td align="left"><span>{$val.name}</span></td>
				            <td align="left">
				            	{$val.price_real}
				            </td>
				            <td align="left">{$val.spec|m_prod_spec=$val['spec_qty'],$val['spec_unit']}</td>
				            <td align="left" onclick="isShow('{:U('isShow')}','{$val.id}','is_hot')" id="is_hot_{$val.id}"><img src="__ROOT__/statics/images/is_show_{$val.is_hot}.png" /></td>
				            <td align="left" onclick="isShow('{:U('isShow')}','{$val.id}','is_recommend')" id="is_recommend_{$val.id}"><img src="__ROOT__/statics/images/is_show_{$val.is_recommend}.png" /></td>
				            <td align="left" onclick="isShow('{:U('isShow')}','{$val.id}','is_new')" id="is_new_{$val.id}"><img src="__ROOT__/statics/images/is_show_{$val.is_new}.png" /></td>
				           	<td align="left" onclick="isShow('{:U('isShow')}','{$val.id}','is_foreign')" id="is_foreign_{$val.id}"><img src="__ROOT__/statics/images/is_show_{$val.is_foreign}.png" /></td>
				            
				            <td align="left">
				            	<input type="text" class="input-text-c input-text" value="{$val.ordlist}" size="4" name="ordlist[{$val.id}]" id="ordlist_{$val.id}" onblur="ordlist('{:U('ordlist')}',{$val.id},'ordlist',this.value)"  onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
								<span id="ordlist_upd_{$val.id}" value="{$val.ordlist}"></span>
							</td>
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	
			    <div class="btn">
					<div id="pages">{$page}</div>
			    </div>
	    	</div>
	    </form>
	</div>
	<div id="dialog_content" title="弹出框"></div>
<script type="text/javascript">

$(function(){
	//打开编辑窗口
	$( "#dialog_content" ).dialog({
		autoOpen: false,
		width:600,
		height:400
	});
})
</script>
</block>